Page({
  data: {
    announcementList: [],
  },
  onLoad() {
    this.getAnnouncementList()
  },
  async getAnnouncementList() {
    const res = await wx.http({
      url: '/announcement',
    })
    if (res.data.code !== 10000) return wx.utils.toast(res.data.message)
    this.setData({
      announcementList: res.data.data,
    })
  },
})